In recent years, computer and network technologies are developed rapidly, and various computers, electric appliances and network terminal devices (such as webcams, Internet phones, web disks, and network printers, etc) and digital electronic devices come with a good quality, a low price, and a thin, light, short and compact design, and thus the aforementioned products are used extensively in our daily life and work. For instance, present household digital electronic devices such as digital cameras, camcorders, DVD-players, set-top-boxes, MP3-players and computers can store a large volume of digital data, but their connecting interface and file format vary with each model and brand, and thus the digital data are not compatible with each other, and even cannot be read by some devices. In view of the foregoing issue, Microsoft extends a technical concept of plug and play to be applied in the environment of a standalone system to the network environment and defines a universal plug and play (UPnP) protocol, and the UPnP protocol focuses on digital home to define a device protocol primarily for facilitating the installation, operation and management of each model of the digital electronic devices, so that users simply plug a network cable into the device and turn on the power, and the operation of the UPnP protocol will complete all necessary setups, and dynamically add a private network, obtain an IP address, declare a user name, provide a required function and check the existence and function of other devices in the private network. Further the UPnP protocol is employed, such that the device can be separated from a private network automatically and stably without causing problems. Since the UPnP protocol does not rely on any specific operating system, programming language or physical medium, therefore the UPnP protocol allows each device in a small private network such as a home network, a small business network, and a network in a business-living building to be used by another computer, application program or smart device, and to become a terminal device of another computer, application program or smart device. Thus, the UPnP protocol has become an important framework, protocol and interface standard used by various different types of computers, network terminal devices, application programs or smart devices.
In general, the UPnP protocol is the most basic protocol adopted by a device which can be a physical device or a logical device including a control point and a controlled device that provides services, wherein the control point is a controller capable of controlling several controlled devices simultaneously, and searching for controlled devices and service descriptions, issuing service commands, inquiring service status and receiving events, and allowing users to execute a program installed in the controlled device (such as CD player).
The UPnP protocol employs several standard protocols such as IP, TCP, UDP, HTTP and XML used extensively in the Internet as communication protocols between devices, and the standard protocols are helpful to implement the controllability between different branded devices. Since the standard protocols have been used extensively in many existing devices, almost no setup or adjustment is needed for the devices to operate in the existing network environment through the UPnP protocol. In general, when a UPnP protocol device is connected to a private network, the device obtains an IP address through a DHCP server, and its control point can use a simple service discovery protocol (SSDP) to actively search for another device of the private network, or another equipment of the private network that can notice a control point through broadcasting, so that the control point can obtain a uniform resource locator (URL) of the other device, and obtain the detailed information of the other device according to the URL. After the information and service description of the other device are obtained, the control point issues a service command to the other device to obtained the desired services.
With the introduction of a new generation operating system Windows Vista, Microsoft develops a Windows rally technology to improve the interconnectivity of network terminal devices, so that any network terminal device in the private network and its installation and connection can be discovered easily by each other for achieving a connection with other network terminal devices to share the functions provided by other network terminal devices. Such arrangement complies with the urgent need for an instant plug-in of the present handheld digital electronic devices. Thus, the Windows rally technology can build a bridge for a flexible interconnection between digital electronic devices. To achieve a simple and easy connection of the digital electronic devices and a uniform communication, Microsoft, Intel, W3C, and other major international companies jointly establish a new standard network service (Device Profile for Web Services, DPWS) and related Web Services (WS) protocol systems for the devices, so as to make the connection of the following types of digital electronic devices simpler and easier as well as the interactive communication safer and more reliable:    (1) Computer and I/O device, such as personal computer, keyboard, game equipment, scanner, printer and projector;    (2) Storage device, such as hard disk, DVD, SD and CD;    (3) Network connecting device, such as router, gateway, and AP;    (4) Media device, such as MP3, stereo, and DVR; and    (5) Home device, such as telephone, smart lamp, and air-conditioner.
In the technical framework of the Windows Rally, a plug and play extensions (PnP-X) protocol is provided for the aforementioned digital electronic devices installed to a computer, so that the electronic devices can discover each other automatically. The digital electronic devices can be used in a way similar to an insertion of a USB digital electronic device, and an application program interface (API) is built in the Windows Vista operating system to provide some new user programming interfaces to support the Windows Rally technology and implement more clients, wherein a function discovery (FD) API can support the simple service discovery protocol (SSDP) and WS-discovery protocol. The FD implemented on the Windows Vista of DPWS comprises a web services discovery (WS-D) and a UPnP AV user programming interface, and the WS-D primarily focuses on the network terminal devices on the Internet to provide corporate application solutions, and the UPnP AV primarily focuses on Audio/Video (AN) digital electronic devices on a home network.
If an electronic device with the installed Windows Vista is connected to a private network, the device will use the UPnP AV protocol to broadcast services to a control point. Similarly, if a control point is added into the private network, the control point will use the UPnP protocol to search for the related information of a desired device existed on the private network. If a control point has found a device, the control point still has little information about the device. To let the control point know more information about the device or communicate with the device, the control point loads the URL from the device via a browser, and obtains the description information such as a model name, a serial number, a manufacturer name and a brand in the URL message issued by the device. After a control point obtains the description and information of a device, the control point will send out a control instruction to the device.
From the description above, although the discovery protocol such as the aforementioned UPnP AV protocol and WS-Discovery protocol allows any of the network terminal devices in a private network to have the mechanisms of discovering, installing and connecting each other automatically and easily, and achieve a connection with other network terminal devices on the same private network to share services provided by other network terminal devices. Since many present private networks generally install a network address transfer (NAT) router at their outlets, a packet is issued from the boundary of the private network and the public network to the network terminal devices of the private network for converting the IP address, so that the network terminal devices in the private network can share an IP address for connecting to the Internet. In other words, if an IP data packet issued by a private network reaches a NAT router, the NAT is responsible to convert an internal IP address of a private network into a legal IP address of the public network. After an external transmitted data has reached the NAT router, the NAT converts the public network address into a private network address by checking the information in a mapping table stored in the NAT, and transfers the public network address to the internal receiving node. Since the IP address is a private address that cannot be recognized by a public network, a connection channel cannot be established between the network terminal devices of the two private networks to share the services provided by the corresponding network terminal device via the Internet.
Therefore, it is an important subject for manufacturers to design a user agent (UA) installed in a network terminal device, such that the network terminal device can be connected with other network terminal devices on the private network for accessing data, and a connection channel can be established between the network terminal devices of the public network and another private network, and the network terminal devices on the other private network can share the services provided by other network terminal devices on the private network.